import request from "@/utils/request";

// 查询维修历史记录列表
export function listRepairHistory(query) {
  return request({
    url: "/equipment/repairHistory/list",
    method: "get",
    params: query,
  });
}

// 查询维修历史记录所有列表
export function listAllRepairHistory(query) {
  return request({
    url: "/equipment/repairHistory/listAll",
    method: "get",
    params: query,
  });
}

// 查询维修历史记录详细
export function getRepairHistory(id) {
  return request({
    url: "/equipment/repairHistory/getInfo/" + id,
    method: "get",
  });
}

// 新增维修历史记录
export function addRepairHistory(data) {
  return request({
    url: "/equipment/repairHistory/add",
    method: "post",
    data: data,
  });
}

// 修改维修历史记录
export function updateRepairHistory(data) {
  return request({
    url: "/equipment/repairHistory/edit",
    method: "post",
    data: data,
  });
}

// 删除维修历史记录
export function delRepairHistory(id) {
  return request({
    url: "/equipment/repairHistory/remove/" + id,
    method: "get",
  });
}

// 删除维修历史记录
export function newRepair(id) {
  return request({
    url: "/equipment/repairHistory/getNewest/" + id,
    method: "get",
  });
}
